//
//  HeaderView.m
//  Products_B
//
//  Created by lanou on 16/5/31.
//  Copyright © 2016年 朋学友. All rights reserved.
//

#import "HeaderView.h"

@implementation HeaderView

- (instancetype)initWithFrame:(CGRect)frame imageUrlArray:(NSMutableArray *)imageUrlStringArray{
    if (self = [super initWithFrame:frame]) {
        _scrollView = [[LspScrollView alloc] initWithframe:CGRectMake(0, 0, kWidth, 360 * kWidth / 640) array:imageUrlStringArray];
        [self addSubview:_scrollView];
        
        _salesLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, _scrollView.frame.origin.y + _scrollView.frame.size.height + 10, 200, 20)];
        _salesLabel.font = [UIFont systemFontOfSize:12];
        _salesLabel.alpha = 0.5;
        [self addSubview:_salesLabel];
        
        
        _nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, _salesLabel.frame.origin.y + _salesLabel.frame.size.height + 10, kWidth / 2, 20)];
        _nameLabel.font = [UIFont systemFontOfSize:14];
        [self addSubview:_nameLabel];
        
        _priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, _nameLabel.frame.origin.y + _nameLabel.frame.size.height + 10, 100, 30)];
        _priceLabel.textColor = [UIColor redColor];
        [self addSubview:_priceLabel];
        
        _streetpriceLabel = [[UILabel alloc] initWithFrame:CGRectMake(105, _priceLabel.frame.origin.y + 5, 100, 20)];
        _streetpriceLabel.font = [UIFont systemFontOfSize:15];
        _streetpriceLabel.alpha = 0.6;
        [self addSubview:_streetpriceLabel];
        
        UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(_streetpriceLabel.frame.origin.x, _streetpriceLabel.frame.origin.y + 9, _streetpriceLabel.frame.size.width - 30, 1)];
        lineView.backgroundColor = [UIColor grayColor];
        lineView.alpha = 0.6;
        [self addSubview:lineView];
        
        _postLabel = [[UILabel alloc] initWithFrame:CGRectMake(205, _streetpriceLabel.frame.origin.y, 60, 20)];
        _postLabel.font = [UIFont systemFontOfSize:12];
        [self addSubview:_postLabel];
        
    }
    return self;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
